//
//  PreDetailVC.m
//  艾听歌
//
//  Created by dllo on 16/5/23.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "PreDetailVC.h"

@interface PreDetailVC ()

@end

@implementation PreDetailVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
//    self.view.backgroundColor = [UIColor redColor];
    
    
    NSNumber *type = [self.actionDic objectForKey:@"type"];
    NSString *valueUrl = [self.actionDic objectForKey:@"value"];
    NSString *webUrl = nil;
//    NSLog(@"type==%@", type);
    if ([type floatValue] == 1) {
  
        webUrl = valueUrl;
    
    }else{
//        NSLog(@"%@", valueUrl);
        webUrl = [NSString stringWithFormat:@"http://h.dongting.com/yule/app/xqp.html?id=%@", valueUrl];
        
    }
    
    UIWebView *wv = [[UIWebView alloc] initWithFrame:self.view.frame];
    
    [self.view addSubview:wv];
    
    //加载数据
    NSURL *url = [NSURL URLWithString:webUrl];
    NSURLRequest *req = [NSURLRequest requestWithURL:url];
    [wv loadRequest:req];

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
